<template>
  <div class="g1">
    <h2>我是孙子组件</h2>
  </div>
</template>

<script>
export default {
  name: 'Grandson',

  methods: {
    beforeCreate() {
      console.log('孙子挂在之前');
    },
  },
}
</script>

<style scoped>
.g1 {
  background-color: darkolivegreen;
  padding: 15px;
  box-shadow: 0 0 10px;
}
</style>